package cn.oa.dao;

import cn.oa.entity.Attendance;
import org.apache.ibatis.annotations.Param;

import java.sql.SQLException;
import java.util.List;

public interface AttendanceMapper {
    //删除员工的所有考勤记录
    public int deleteAttendanceByEmployeeId(int employeeId);
    //查找打卡记录
    public Attendance getRecordByEmployeeIdAndDate(@Param("employeeId") int employeeId, @Param("date") String date);
    //上班打卡
    public int addSinginByEmployeeId(int employeeId) throws SQLException;
    //根据考勤id记录签退
    public int updateSingoutByAttendanceId(int id) throws SQLException;
    //获取考勤记录
    public List<Attendance> getAttendancesByPage(@Param("name") String name, @Param("searchDate") String searchDate, @Param("currPageNo")int currPageNo, @Param("pageSize") int pageSize);
    //获取记录总数
    public int getAttendancesCount(@Param("name") String name, @Param("searchDate") String searchDate);
}
